n = int(input())
cnt1 = 0
cnt2 = 0
for i in range(n):
    num = int(input())
    if num % 2 == 1:
        cnt1 += 1
    else:
        cnt2 += 1
print(cnt1,cnt2)